<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<!-- 引入easyui的css -->
<link rel="stylesheet" type="text/css" href="<%=path%>/static/easyui_1_5_3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=path%>/static/easyui_1_5_3/themes/icon.css">
<!-- 引入easyui的js -->
<script type="text/javascript" src="<%=path%>/static/easyui_1_5_3/jquery.min.js"></script>
<script type="text/javascript" src="<%=path%>/static/easyui_1_5_3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path%>/static/easyui_1_5_3/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">

//快速查询
function searchQ(){
 	$("#tt").datagrid("load", {time: new Date()});
}
//刷新
function reload(){
	$('#tt').datagrid('reload'); 
}
</script>
</head>

<body>
<button onclick="searchQ()">查询</button>
<button onclick="reload()">刷新</button>
<!-- 注意返回结果 文件是*.json后缀；文件中不能有单引号，结果不显示；生成环境中不存在此问题-->
<table id="tt" class="easyui-datagrid" style="width:600px;height:250px"
		url="datagrid2_getdata.json"
		title="Load Data" iconCls="icon-save"
		rownumbers="true" pagination="true">
	<thead>
		<tr>
			          
                <th data-options="field:'itemid',width:80">Item ID</th>
                <th data-options="field:'productid',width:100">Product</th>
                <th data-options="field:'listprice',width:80,align:'right'">List Price</th>
                <th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
                <th data-options="field:'attr1',width:250">Attribute</th>
                <th data-options="field:'status',width:60,align:'center'">Status</th>
           
		</tr>
	</thead>
</table>
</body>
</html>